package com.youdoneed.community.feign;

import com.youdoneed.base.application.ResultMessage;
import com.youdoneed.community.forum.entity.Forumcomment;
import com.youdoneed.community.forum.entity.Forumnotice;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 说明。
 *
 * @author Ewing
 * @date 2017/4/26
 */
@Component
public class ForumFallback implements ForumClient {

    @Override
    @RequestMapping(value = "/getTotalAttentionMe", method = RequestMethod.GET)
    public ResultMessage<Integer> getTotalAttentionMe(@RequestParam String userId) {
        return new ResultMessage<Integer>().toFailure("获取用户总关注数失败！");
    }

    @Override
    @RequestMapping(value = "/getTotalAgreeMe", method = RequestMethod.GET)
    public ResultMessage<Integer> getTotalAgreeMe(@RequestParam String userId) {
        return new ResultMessage<Integer>().toFailure("获取用户总点赞数失败！");
    }

    @Override
    public ResultMessage<List<Map<String, Object>>> findRecommendAttention(Integer currentPage, Integer rows) {
        return new ResultMessage<List<Map<String, Object>>>().toFailure("推荐关注失败！");
    }

    @Override
    public ResultMessage<List<String>> getMyAttentionUsers(String userId) {
        return new ResultMessage<List<String>>().toFailure("获取我关注的用户失败！");
    }

    @Override
    public ResultMessage<String> saveUserAttention(String attentionedUserId, String userId) {
        return new ResultMessage<String>().toFailure("加关注失败！");
    }

    @Override
    public ResultMessage<String> deleteUserAttentionForFriends(String attentionedUserId, String userId) {
        return new ResultMessage<String>().toFailure("取消关注失败！");
    }

    @Override
    public ResultMessage<String> isFocusOrNot(String userId, String friendId) {
        return new ResultMessage<String>().toFailure("查询是否关注失败！");
    }

    @Override
    public ResultMessage<List<Forumcomment>> getFrindsCommentInNews(String userId, String postId) {
        return new ResultMessage<List<Forumcomment>>().toFailure("获取我的朋友对新闻的评论失败！");
    }

    @Override
    public ResultMessage<Boolean> hasShield(String userId, String shildUserId) {
        return new ResultMessage<Boolean>().toFailure("获取是否屏蔽失败！");
    }

    @Override
    public ResultMessage<Integer> hasPraised(String userId, String postsId) {
        return new ResultMessage<Integer>().toFailure("获取是否点赞失败！");
    }

    @Override
    public ResultMessage<?> updateUserInfo(String userId, String nickName, String userHeadUrl) {
        return new ResultMessage().toFailure("修改用户信息失败！");
    }

    @Override
    public ResultMessage<?> saveAttentionInBatch(String userId, List<String> friendIds) {
        return new ResultMessage().toFailure("批量保存关注失败！");
    }

    @Override
    public ResultMessage<?> saveNoticeInBatch(String userId, List<String> friendIds) {
        return new ResultMessage().toFailure("批量保存通知失败！");
    }


    @Override
    public ResultMessage<?> saveNotice(Forumnotice forumnotice) {
        return new ResultMessage().toFailure("保存通知失败！");
    }

    @Override
    public ResultMessage<Boolean> pushMessageForExtraMsg(String id, String title, String msg, String msgType) {
        return new ResultMessage().toFailure("推送消息失败！");
    }

}
